package com.nbsaas.boot.marketing.rest.convert;

import com.nbsaas.boot.marketing.data.entity.UserPoints;
import com.nbsaas.boot.marketing.api.domain.simple.UserPointsSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 用户积分-列表对象转换器
*/

public class UserPointsSimpleConvert implements Converter<UserPointsSimple, UserPoints> {




@Override
public UserPointsSimple convert(UserPoints source) {
    UserPointsSimple result = new UserPointsSimple();

                result.setTotalEarned(source.getTotalEarned());
                result.setTotalSpent(source.getTotalSpent());
                result.setId(source.getId());
                result.setUserId(source.getUserId());
                result.setAddDate(source.getAddDate());
                result.setPoints(source.getPoints());
                result.setLastDate(source.getLastDate());


    return result;
}

}